# application/models/detection/mistake.py
from sqlalchemy import Column, BigInteger, String, Date, Integer, CHAR
from application.models.base import Base


class Mistake(Base):
    """误差实验数据模型"""
    
    __tablename__ = "detection_mistake"
    
    # 主键
    mistake_id = Column(BigInteger, primary_key=True, comment="误差实验id")
    
    # 外键关联产品ID
    product_id = Column(BigInteger, comment="产品ID")
    
    # 误差实验基本信息
    mistake_name = Column(String(30), comment="误差实验名称")
    mistake_no = Column(String(30), comment="误差实验编号")
    mistake_person = Column(String(30), comment="实验人员")
    mistake_type = Column(CHAR(1), comment="实验类型")
    
    # 表注释
    __table_args__ = {"comment": "误差实验表"}